import { OverlayContainer } from '@angular/cdk/overlay';
import { NgModule } from '@angular/core';

@NgModule({
  imports: [],
  declarations: [],
  exports: [],
})
export class OverlayContainerModule {
  constructor(private overlayContainer: OverlayContainer) {
    this.overlayContainer.ngOnDestroy = function (): void {};
    this.overlayContainer.getContainerElement = function (): HTMLElement {
      this._containerElement = document.querySelector('.cdk-overlay-container');
      if (!this._containerElement) {
        this._createContainer();
      }
      return this._containerElement;
    };
  }
}
